<RadzenTemplateForm TItem="MissionControl.LaunchPad" Data=@Edited Submit=@OnOk class="h-100">
    <RadzenStack Orientation="Orientation.Vertical" JustifyContent="JustifyContent.SpaceBetween" class="h-100">
        <RadzenStack Orientation="Orientation.Vertical" Gap="0">
            <RadzenText Text="Name" />
            <RadzenTextBox Name="LaunchPadName" @bind-Value=@Edited.Name />
            <RadzenRequiredValidator Component="LaunchPadName" Text="Name is required" />
            <RadzenText Text="Endpoint" />
            <RadzenTextBox @bind-Value=@EditedLaunchPadEndpoint />
            @if (EditedLaunchPadEndpointErrorMessage != "")
            {
                <span class="rz-message rz-messages-error">
                    @EditedLaunchPadEndpointErrorMessage
                </span>
            }
            <RadzenText Text="Launchpad identifier" />
            <RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center">
                <RadzenTextBox Value=@Edited.Identifier.ToString() Disabled="true" class="w-100"/>
                <RadzenButton class="rz-ml-4" Icon="refresh" ButtonStyle="ButtonStyle.Info" Size="ButtonSize.Medium"
                              Variant="Variant.Outlined"
                              Disabled=@(EditedLaunchPadEndpoint == "")
                              Click=@OnValidateLaunchPadEndpoint />
            </RadzenStack>
            @if (EditedLaunchPadIdentifierErrorMessage != "")
            {
                <span class="rz-message rz-messages-error">
                    @EditedLaunchPadIdentifierErrorMessage
                </span>
            }
        </RadzenStack>
        <RadzenStack Orientation="Orientation.Horizontal" class="text-end" JustifyContent="JustifyContent.End">
            <RadzenButton Text="Cancel" Click=OnCancel ButtonStyle="ButtonStyle.Light" Style="width: 120px" />
            <RadzenButton Text=@(ToEdit.Identifier == Guid.Empty ? "Add" : "Update") ButtonType="ButtonType.Submit" ButtonStyle="ButtonStyle.Info"
                          Style="width: 120px; margin-left:24px;" />
        </RadzenStack>
    </RadzenStack>
</RadzenTemplateForm>
